import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('Player')
export class Player extends Component {
    @property
    Player_Speed: number = 30

    start() {
        console.log('start')
    }

    update(deltaTime: number) {
        //console.log('update')
        const pos = this.node.getPosition();
        console.log('update', pos);
        const z = pos.z - deltaTime * this.Player_Speed;
        //this.node.setPosition(pos.x, pos.y, pos.z - 0.1)
        this.node.setPosition(pos.x, pos.y, z)
    }
}


